//package com.chenglu.android.mine.collect.adapter;
//
//import android.content.Context;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.ImageView;
//import android.widget.TextView;
//
//import androidx.annotation.NonNull;
//import androidx.annotation.Nullable;
//import androidx.recyclerview.widget.LinearLayoutManager;
//import androidx.recyclerview.widget.RecyclerView;
//
//import com.chad.library.adapter.base.BaseQuickAdapter;
//import com.chad.library.adapter.base.BaseViewHolder;
//import com.chenglu.android.R;
//import com.chenglu.android.common.utils.GlideUtils;
//import com.chenglu.android.common.utils.Utils;
//import com.chenglu.android.mine.bean.CollectBean;
//
//import com.yl.recyclerview.widget.SlideItemView;
//
//import java.util.List;
//
///**
// * @author: lyj
// * @Created: by Copyright 2023/7/24 Guangzhou Hongma Technology Co., Ltd. All rights reserved.
// * @Description：
// */
//public class CollectAdapterTest extends SlideViewAdapter<CollectBean.Data.Records> {
//
//    /**
//     * MsgEntity 为你的数据源数据类型
//     */
//    private List<CollectBean.Data.Records> mDatas; // 数据源
//    private Context mContext;
//
//    public CollectAdapterTest(List<CollectBean.Data.Records> mDatas, Context mContext) {
//        this.mDatas = mDatas;
//        this.mContext = mContext;
//    }
//
//    @Override
//    protected List<CollectBean.Data.Records> getDataList() {
//        return mDatas;
//    }
//
//    @Override
//    protected View bindContent(ViewGroup parent, CollectBean.Data.Records item, int pos) {
//        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_collect_test,parent,false);
//
//        //绑定侧滑id
////       SwipeRevealLayout swipeRevealLayout =  helper.getView(R.id.swipereveal_layout);
////       TextView tvDelete =  helper.getView(R.id.tv_delete);
////       helper.addOnClickListener(R.id.tv_delete);
////       viewBinderHelper.bind(swipeRevealLayout, item.getId());
//
//        TextView tvPrice =  view.findViewById(R.id.tv_item_price);
//        TextView tvDistance =  view.findViewById(R.id.tv_item_distance);
//        RecyclerView recyclerView =  view.findViewById(R.id.rv_item_coupon);
//
//        TextView tv_item_sellnumber =  view.findViewById(R.id.tv_item_sellnumber);
//        TextView tv_item_title =  view.findViewById(R.id.tv_item_title);
//
//        SlideItemView slideItemView =  view.findViewById(R.id.slideview);
//
//
//        //收藏类型 1-商品 2-店铺
//        switch (item.getCollectType()){
//            case 1:
//                tv_item_title.setText(item.getGoodsName());
//                tvPrice.setVisibility(View.VISIBLE);
//                tvPrice.setText("￥" + Utils.formatZeroNumber(item.getGoodsPrice()));
//                tvDistance.setVisibility(View.GONE);
//                recyclerView.setVisibility(View.GONE);
//                break;
//            case 2 :
//                tvDistance.setVisibility(View.VISIBLE);
//                tvPrice.setVisibility(View.GONE);
//                tv_item_title.setText(item.getShopsName());
//                tvDistance .setText(item.getDistance()+"km");
//                break;
//        }
//        ImageView imageView = view.findViewById(R.id.iv_collect);
//        GlideUtils.setImageView(mContext,item.getGoodsImg(),imageView,8);
//
//        tv_item_sellnumber.setText("月售"+item.getMonthSaleCount());
//
//        CouponListAdapter listAdapter = new CouponListAdapter(mContext,item.getCouponList());
//        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
//        recyclerView.setAdapter(listAdapter);
//        listAdapter.notifyDataSetChanged();
//        return view;
//    }
//
//    @Override
//    protected Context getContext() {
//        return mContext;
//    }
//
//
//    //侧滑删除
////    public void saveStates(Bundle outState) {
////        viewBinderHelper.saveStates(outState);
////    }
////
////    public void restoreStates(Bundle inState) {
////        viewBinderHelper.restoreStates(inState);
////    }
//}
